﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OAuth.Sina
{
    public class SinaOAuthRequestURL : IOAuthRequestURL
    {
        private Uri BaseURL = new Uri("http://api.t.sina.com.cn", UriKind.Absolute);

        /// <summary>
        /// 获取未授权的Request Token
        /// </summary>
        /// <returns></returns>
        public Uri GetRequestTokenURL()
        {
            return new Uri(BaseURL, "/oauth/request_token");
        }

        /// <summary>
        /// 请求用户授权Token
        /// </summary>
        /// <returns></returns>
        public Uri GetRequestOAuthTokenURL()
        {
            return new Uri(BaseURL, "/oauth/authorize");
        }

        /// <summary>
        /// 获取授权过的Access Token
        /// </summary>
        /// <returns></returns>
        public Uri GetRequestAccessTokenURL()
        {
            return new Uri(BaseURL, "/oauth/access_token");
        }

        #region  获取下行数据集(timeline)接口
        /// <summary>
        /// 获取最新更新的公共微博消息 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_PublicTimeline()
        {
            return new Uri(BaseURL, "statuses/public_timeline");
        }

        /// <summary>
        /// 获取当前用户所关注用户的最新微博信息 (别名: statuses/home_timeline)
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_FriendsTimeline()
        {
            return new Uri(BaseURL, "statuses/friends_timeline");
        }

        /// <summary>
        /// 获取用户发布的微博信息列表 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_UserTimeline()
        {
            return new Uri(BaseURL, "statuses/user_timeline");
        }

        /// <summary>
        /// 获取@当前用户的微博列表  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Mentions()
        {
            return new Uri(BaseURL, "statuses/mentions");
        }

        /// <summary>
        /// 获取当前用户发送及收到的评论列表 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_CommentsTimeline()
        {
            return new Uri(BaseURL, "statuses/comments_timeline");
        }

        /// <summary>
        /// 获取当前用户发出的评论 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_CommentsByMe()
        {
            return new Uri(BaseURL, "statuses/comments_by_me");
        }

        /// <summary>
        /// 获取指定微博的评论列表
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Comments()
        {
            return new Uri(BaseURL, "statuses/comments");
        }

        /// <summary>
        /// 批量获取一组微博的评论数及转发数 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Counts()
        {
            return new Uri(BaseURL, "statuses/counts");
        }

        /// <summary>
        /// 获取当前用户未读消息数  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Unread()
        {
            return new Uri(BaseURL, "statuses/unread");
        }
        #endregion

        #region  微博访问接口
        /// <summary>
        /// 根据ID获取单条微博信息内容  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Show()
        {
            return new Uri(BaseURL, "statuses/show");
        }

        /// <summary>
        /// 根据微博ID和用户ID跳转到单条微博页面   
        /// </summary>
        /// <returns></returns>
        public Uri GetUser_Status_Id()
        {
            return new Uri(BaseURL, "user/status/id");
        }

        /// <summary>
        /// 发布一条微博信息 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Update()
        {
            return new Uri(BaseURL, "statuses/update");
        }

        /// <summary>
        /// 上传图片并发布一条微博信息   
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Upload()
        {
            return new Uri(BaseURL, "statuses/upload");
        }

        /// <summary>
        /// 删除一条微博信息  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Destroy()
        {
            return new Uri(BaseURL, "statuses/destroy");
        }

        /// <summary>
        /// 转发一条微博信息（可加评论）  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Repost()
        {
            return new Uri(BaseURL, "statuses/repost");
        }

        /// <summary>
        /// 对一条微博信息进行评论  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Comment()
        {
            return new Uri(BaseURL, "statuses/comment");
        }

        /// <summary>
        /// 删除当前用户的微博评论信息  
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_CommentsDestroy()
        {
            return new Uri(BaseURL, "statuses/comment_destroy");
        }

        /// <summary>
        /// 回复微博评论信息 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Reply()
        {
            return new Uri(BaseURL, "statuses/reply");
        }
        #endregion

        #region  用户接口
        /// <summary>
        /// 根据用户ID获取用户资料（授权用户  
        /// </summary>
        /// <returns></returns>
        public Uri GetUsers_Show()
        {
            return new Uri(BaseURL, "users/show");
        }

        /// <summary>
        /// 获取当前用户关注对象列表及最新一条微博信息 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Friends()
        {
            return new Uri(BaseURL, "statuses/friends");
        }

        /// <summary>
        /// 获取当前用户粉丝列表及最新一条微博信息 
        /// </summary>
        /// <returns></returns>
        public Uri GetStatuses_Followers()
        {
            return new Uri(BaseURL, "statuses/followers");
        }
        #endregion

        #region  私信接口
        /// <summary>
        /// 获取当前用户最新私信列表   
        /// </summary>
        /// <returns></returns>
        public Uri GetDirectMessages()
        {
            return new Uri(BaseURL, "direct_messages");
        }

        /// <summary>
        /// 获取当前用户发送的最新私信列表 
        /// </summary>
        /// <returns></returns>
        public Uri GetDirectMessages_Sent()
        {
            return new Uri(BaseURL, "direct_messages/sent");
        }

        /// <summary>
        /// 发送一条私信 
        /// </summary>
        /// <returns></returns>
        public Uri GetDirectMessages_New()
        {
            return new Uri(BaseURL, "direct_messages/new");
        }

        /// <summary>
        /// 删除一条私信 
        /// </summary>
        /// <returns></returns>
        public Uri GetDirectMessages_Destroy()
        {
            return new Uri(BaseURL, "direct_messages/destroy");
        }
        #endregion

        #region  关注接口
        /// <summary>
        /// 关注某用户    
        /// </summary>
        /// <returns></returns>
        public Uri GetFriendships_Create()
        {
            return new Uri(BaseURL, "friendships/create");
        }

        /// <summary>
        /// 取消关注   
        /// </summary>
        /// <returns></returns>
        public Uri GetFriendships_Destroy()
        {
            return new Uri(BaseURL, "friendships/destroy");
        }

        /// <summary>
        /// 是否关注某用户(推荐使用friendships/show) 
        /// </summary>
        /// <returns></returns>
        public Uri GetFriendships_Exists()
        {
            return new Uri(BaseURL, "friendships/exists");
        }

        /// <summary>
        /// 获取两个用户关系的详细情况 
        /// </summary>
        /// <returns></returns>
        public Uri GetFriendships_Show()
        {
            return new Uri(BaseURL, "friendships/show");
        }
        #endregion

        #region  Social Graph接口
        /// <summary>
        /// 获取用户关注对象uid列表  
        /// </summary>
        /// <returns></returns>
        public Uri GetFriends_Ids()
        {
            return new Uri(BaseURL, "friends/ids");
        }

        /// <summary>
        /// 获取用户粉丝对象uid列表  
        /// </summary>
        /// <returns></returns>
        public Uri GetFollowers_Ids()
        {
            return new Uri(BaseURL, "followers/ids");
        }
        #endregion

        #region  账号接口
        /// <summary>
        ///验证当前用户身份是否合法 
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_VerifyCredentials()
        {
            return new Uri(BaseURL, "account/verify_credentials");
        }

        /// <summary>
        ///获取当前用户API访问频率限制 
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_RateLimitStatus()
        {
            return new Uri(BaseURL, "account/rate_limit_status");
        }

        /// <summary>
        ///当前用户退出登录
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_EndSession()
        {
            return new Uri(BaseURL, "account/end_session");
        }

        /// <summary>
        ///更改头像 
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_UpdateProfileImage()
        {
            return new Uri(BaseURL, "account/update_profile_image");
        }

        /// <summary>
        ///更改资料
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_UpdateProfile()
        {
            return new Uri(BaseURL, "account/update_profile");
        }

        /// <summary>
        ///注册新浪微博帐号 
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_Register()
        {
            return new Uri(BaseURL, "account/register");
        }

        /// <summary>
        ///二次注册微博的接口 
        /// </summary>
        /// <returns></returns>
        public Uri GetAccount_Activate()
        {
            return new Uri(BaseURL, "Account/activate");
        }
        #endregion

        #region  收藏接口
        /// <summary>
        ///获取当前用户的收藏列表 
        /// </summary>
        /// <returns></returns>
        public Uri GetFavorites()
        {
            return new Uri(BaseURL, "favorites");
        }

        /// <summary>
        ///添加收藏  
        /// </summary>
        /// <returns></returns>
        public Uri GetFavorites_Create()
        {
            return new Uri(BaseURL, "favorites/create");
        }

        /// <summary>
        ///删除当前用户收藏的微博信息  
        /// </summary>
        /// <returns></returns>
        public Uri GetFavorites_destroy()
        {
            return new Uri(BaseURL, "favorites/destroy");
        }
        #endregion

    }
}
